package com.epoint.mobileoa.personalized.epointcompany.bizlogic;

import java.util.HashMap;
import java.util.List;

import android.os.Message;

import com.epoint.mobileoa.bizlogic.SuperView;
import com.epoint.mobileoa.bizlogic.Task;
import com.epoint.mobileoa.db.DBHelp;
import com.epoint.mobileoa.http.HttpHelp;
import com.epoint.mobileoa.model.CodeItemsModel;

/**
 * @author liyc
 * @time 2012-4-25 下午4:28:03
 * @annotation 初始化出差计划数据
 */
public class InitChuchaijihuaTask extends Task {

	/**
	 * @param con
	 * @param param
	 */
	public InitChuchaijihuaTask(SuperView con, HashMap<String, Object> param) {
		super(con, param);
	}

	@Override
	public void exectue(Message mess) throws Exception {
		String seamurl = generateURL("Epoint_InitChuchaijihua");
		String bs = HttpHelp.getHttpBack(seamurl);
		List<CodeItemsModel> list = InitAddWorkContentPageInfoTask.XmlAnalysis(bs);
		DBHelp.saveCode_Items(getCon(),list);
		setMessageToRefreshUI(mess, getCon(), null);
	}

}
